package com.w2cx.selenium.operate;

import com.w2cx.selenium.base.DriverBase;
import com.w2cx.selenium.page.VideoReviewPage;
import org.openqa.selenium.WebElement;

import java.util.List;

public class VideoReviewOperate {

    DriverBase driver;
    VideoReviewPage vrp;
    public VideoReviewOperate(DriverBase driver){
        this.driver = driver;
        vrp = new VideoReviewPage(driver);
    }


    //点击“内容审核”菜单
    public void clickContentReviewMenu(){
        vrp.click(vrp.getContentReviewMenu());
    }

    //点击“视频审核”菜单
    public void clickVideoReviewMenu(){

        vrp.click(vrp.getVideoReviewMenu());
    }

    //获取第一条视频ID
    public WebElement getFirstVideoID(){
        return vrp.getFirstVideoID();
    }

    //点击第一条对应去审核
    public void clickToReviewBtn(){
        vrp.click(vrp.getFirstToReviewBtn());
    }

    //输入内容简介
    public void sendContentIntroduction(String introduction){
        vrp.sendKeys(vrp.getContentIntroduInput(),introduction);
    }

    //点击发布按钮
    public void clickReleaseBtn(){
        vrp.click(vrp.getReleaseBtn());
    }

    //获取视频列表
    public List<WebElement> getUnReviewVideoList(){
        return vrp.getUnReviewVideoList();
    }

}
